package zeno.project.springboot.jms;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Service;

/**
 * @author ZhiYong
 * @ClassName QueueConsumer.java
 * @Description  消息消费者
 * @createTime 2021/04/17 17:03:00
 */
@Service
public class QueueConsumer {
    /**
     * 接收点对点消息
     * @param msg 收到的消息
     */
    @JmsListener(destination = ActiveMqConfig.QUEUE_NAME)
    public void receiveQueueMsg(String msg) {
        System.out.println("收到的消息为：" + msg);
    }
}
